package com.zzty.txj.serviceImpl;


import com.zzty.txj.dao.LocationMapper;
import com.zzty.txj.entity.Location;
import com.zzty.txj.service.LocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class LocationServiceImpl implements LocationService {
    @Autowired
    LocationMapper  locationMapper;
    @Override
    public Integer insertLocation(Location location) {
        Integer count = locationMapper.insertLocation(location);
        return count;
    }

    @Override
    public List<Location> getLocations() {
        List<Location>locations = new ArrayList<>();
        locations = locationMapper.getLocations();
        return locations;
    }

    @Override
    public Integer deleteLocation(Location location) {
        Integer count = locationMapper.deleteLocation(location);
        return count;
    }
}
